<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			img{
				position: relative;
			}
		</style>
		<script src="js/jquery-3.7.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function(){
				$("button").eq(0).click(function(){
					$("img").animate({
						"left":"0px",
						"width":"50px"
					},0,function(){
						$("img").css("transform","rotateY(0deg)")
					}).animate({
						"left":"300px",
						"width":"200px"
					},2000,function(){
						$("img").css("transform","rotateY(180deg)")
					}).animate({
						"left":"0px",
						"width":"50px"
					},2000,function(){
						$("img").css("transform","rotateY(0deg)")
					})
				})
				$("button").eq(1).click(function(){
					$("img").stop(true)
				})
			})
		</script>
	</head>
	<body>
		<button>开始动画</button>
		<button>停止动画</button>
		<div>
			<img src="img/fish.png" width="50px">
		</div>
	</body>
</html>
